home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / Visual Cafe Pro v1.0 / VISCAFE.BIN / CompareCells.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-06-19  |  842 b   |  22 lines

  1. package symantec.itools.awt;
  2.  
  3. class CompareCells implements CompareFunc {
  4.    public boolean lessThan(Object var1, Object var2) {
  5.       if (var1 == null) {
  6.          var1 = new Cell((MultiList)null);
  7.       }
  8.  
  9.       if (var2 == null) {
  10.          var2 = new Cell((MultiList)null);
  11.       }
  12.  
  13.       if (var1 instanceof Cell && var2 instanceof Cell) {
  14.          Cell var3 = (Cell)var1;
  15.          Cell var4 = (Cell)var2;
  16.          return var3.text.compareTo(var4.text) < 0;
  17.       } else {
  18.          throw new IllegalArgumentException("Objects to compare must be Cell instances");
  19.       }
  20.    }
  21. }
  22.